<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>My Team</title>
        <link href="css/global.css" rel="stylesheet" type="text/css" />
        <script src="http://code.jquery.com/jquery-latest.js"></script>
        <script src="js/global.js"></script>
    </h:head>
    <h:body>
        <div id="background">
            <div class="navy"></div>
            <div id="content">
                <div id="scheduleDiv">
                    <f:view>
                        <h:form id="form">
                            <h:dataTable binding="#{myTeam.table}" value="#{myTeam.teamList}" var="item">
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Teams" />
                                    </f:facet>
                                    <h:commandButton value="#{item.name}" class="short">
                                        <f:ajax render=":form:lineup" listener="#{myTeam.selectTeam()}"/>
                                    </h:commandButton>
                                </h:column>
                            </h:dataTable>
                            <h:dataTable id="lineup" value="#{myTeam.mergedList}" var="item">
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="POS" />
                                    </f:facet>
                                    <h:outputText value="#{item.player.fantasyPositionInRoster}"/>
                                </h:column>
                                <h:column>
                                    <h:graphicImage url="#{item.player.playerId.photoURL}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Player" />
                                    </f:facet>
                                    <h:outputText value="#{item.player.playerId.firstName} #{item.player.playerId.lastName}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Passing Yds" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.passingYards}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Passing TD" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.passingTouchdowns}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Rushing Yds" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.rushingYards}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Rushing TD" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.rushingTouchdowns}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Receiving Yds" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.receivingYards}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Receiving TD" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.receivingTouchdowns}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Interceptions" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.interceptions}"/>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Fantasy Points" />
                                    </f:facet>
                                    <h:outputText value="#{item.game.fantasyPoints}"/>
                                </h:column>
                            </h:dataTable>
                        </h:form>
                    </f:view>
                </div>
            </div>
        </div>
    </h:body>
</html>
